package com.briup.day19;

public class Test_JVM {
    public static void main(String[] args) throws InterruptedException {
        for(int i=0;i<1000000;i++) {
            new Test(i);
//            System.out.println(i);
            Thread.sleep(3000);
            System.err.println("main end");
        }
    }
}
class Test{
    private int a;

    public Test(int a) {
        this.a = a;
    }
    @Override
    public void finalize() throws Throwable {
        System.out.println("销毁test: "+a);
        super.finalize();
    }
}
